import React,{ memo , Suspense} from 'react';
import { Provider } from 'react-redux'
import { renderRoutes } from 'react-router-config'

import { HashRouter } from 'react-router-dom'
import store from './store'
import routes from './router'

import FAppHeader from 'components/app-header'
import FAppPlayerBar from 'pages/player/app-player-bar'

import { Spin } from 'antd';

function App() {
  return (
    <Provider store={store}>
      <HashRouter>
          <FAppHeader />
          <Suspense fallback={<Spin />}>{renderRoutes(routes)}</Suspense>
          <FAppPlayerBar />
      </HashRouter>
    </Provider>  
      
   
  )
}

export default memo(App);
